﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace BuisnessData
{
    public enum PolutionFactor { Low, Medium, High };
    public class Car : ILocatable, INotifyPropertyChanged
    {
        PolutionFactor _polutionFacotr;

        public PolutionFactor PolutionFacotr
        {
            get { return _polutionFacotr; }
            set { 
                _polutionFacotr = value;
                RaisePropertyChanged("PolutionFacotr");
            }
        }
        
        private GeographicLocation _location;
        public GeographicLocation Location
        {
            get { return _location; }
            set
            {
                _location = value;
                RaisePropertyChanged("Location");
            }
        }


        #region INotifyPropertyChanged Members
        public event PropertyChangedEventHandler PropertyChanged;
        protected void RaisePropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = this.PropertyChanged;
            if (handler != null)
            {
                PropertyChangedEventArgs args =
                    new PropertyChangedEventArgs(propertyName);
                handler(this, args);
            }
        }
        #endregion

    }
}
